﻿// -----------------------------------------------------------------------
// <copyright file="IDirectory.cs" company="Company">
// Company 2011
// </copyright>
// -----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.AccessControl;

namespace Company.IO.Interfaces
{
    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    [Guid("a4474c28-5cce-4754-a1b1-d8493567ca5f")]
    public interface IDirectory
    {
        /// <summary>
        /// Get the DirectoryInfo from the given Path
        /// </summary>
        /// <param name="path">The path to get the info from</param>
        /// <returns>
        /// The given directory, 
        /// including the root of a UNC server or share name.
        /// </returns>
        [SecuritySafeCritical]
        IDirectoryInfo GetDirectoryInfo(string path);

        /// <summary>
        /// Get the Parent from given Path
        /// </summary>
        /// <param name="path">The path to get the Parent from</param>
        /// <returns>
        /// The parent directory, or a null reference (Nothing in Visual Basic) if path is the root directory, 
        /// including the root of a UNC server or share name.
        /// </returns>
        /// <exception cref="IIOException">The directory specified by path is read-only.</exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, 
        /// contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path was not found.</exception>
        [SecuritySafeCritical]
        IDirectoryInfo GetParent(string path);

        /// <summary>
        /// Create the Directory from given Path
        /// </summary>
        /// <param name="path">The directory to create.</param>
        /// <returns>
        /// A IDirectoryInfo object representing the newly created directory.
        /// </returns>
        /// <exception cref="IIOException">
        /// <para>The directory specified by path is a file.</para>
        /// <para>-or-</para>
        /// <para>The network name is not known.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// <para>path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</para> 
        /// <para>-or-</para>
        /// <para>path is prefixed with, or contains only a colon character (:).</para>
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path was not found.</exception>
        /// <exception cref="NotSupportedException">path contains a colon character (:) that is not part of a drive label ("C:\").</exception>
        [SecuritySafeCritical]
        IDirectoryInfo CreateDirectory(string path);

        /// <summary>
        /// Create the Directory from given Path
        /// </summary>
        /// <param name="path">The directory to create.</param>
        /// <param name="directorySecurity">The access control to apply to the directory.</param>
        /// <returns>
        /// A IDirectoryInfo object representing the newly created directory.
        /// </returns>
        /// <exception cref="IIOException">
        /// <para>The directory specified by path is a file.</para>
        /// <para>-or-</para>
        /// <para>The network name is not known.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// <para>path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.</para> 
        /// <para>-or-</para>
        /// <para>path is prefixed with, or contains only a colon character (:).</para>
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path was not found.</exception>
        /// <exception cref="NotSupportedException">path contains a colon character (:) that is not part of a drive label ("C:\").</exception>
        [SecuritySafeCritical]
        IDirectoryInfo CreateDirectory(string path, DirectorySecurity directorySecurity);

        /// <summary>
        /// Determines whether the given path refers to an existing directory on disk.
        /// </summary>
        /// <param name="path">The path to test.</param>
        /// <returns>true if path refers to an existing directory; otherwise, false</returns>
        [SecuritySafeCritical]
        bool Exists(string path);

        /// <summary>
        /// Sets the creation date and time for the specified file or directory.
        /// </summary>
        /// <param name="path">The file or directory for which to set the creation date and time information.</param>
        /// <param name="creationTime">A DateTime containing the value to set for the creation date and time of path. This value is expressed in local time.</param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        void SetCreationTime(string path, DateTime creationTime);

        /// <summary>
        /// Sets the creation date and time, in Coordinated Universal Time (UTC) format, for the specified file or directory.
        /// </summary>
        /// <param name="path">The file or directory for which to set the creation date and time information.</param>
        /// <param name="creationTimeUtc">A DateTime containing the value to set for the creation date and time of path. This value is expressed in UTC time.</param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        [SecuritySafeCritical]
        void SetCreationTimeUtc(string path, DateTime creationTimeUtc);

        /// <summary>
        /// Gets the creation date and time of a directory.
        /// </summary>
        /// <param name="path">The path of the directory.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>A DateTime structure set to the creation date and time for the specified directory. This value is expressed in local time.</returns>
        [SecuritySafeCritical]
        DateTime GetCreationTime(string path);

        /// <summary>
        /// Gets the creation date and time, in Coordinated Universal Time (UTC) format, of a directory.
        /// </summary>
        /// <param name="path">The path of the directory.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>A DateTime structure set to the creation date and time for the specified directory. This value is expressed in UTC time.</returns>
        [SecuritySafeCritical]
        DateTime GetCreationTimeUtc(string path);

        /// <summary>
        /// Sets the date and time a directory was last written to.
        /// </summary>
        /// <param name="path">The path of the directory.</param>
        /// <param name="lastWriteTime">The date and time the directory was last written to. This value is expressed in local time.</param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        void SetLastWriteTime(string path, DateTime lastWriteTime);

        /// <summary>
        /// Sets the date and time, in Coordinated Universal Time (UTC) format, that a directory was last written to.
        /// </summary>
        /// <param name="path">The path of the directory.</param>
        /// <param name="lastWriteTimeUtc">The date and time the directory was last written to. This value is expressed in UTC time.</param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        [SecuritySafeCritical]
        void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc);

        /// <summary>
        /// Returns the date and time the specified file or directory was last written to.
        /// </summary>
        /// <param name="path">The file or directory for which to obtain modification date and time information.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>A DateTime structure set to the date and time the specified file or directory was last written to. This value is expressed in local time.</returns>
        [SecuritySafeCritical]
        DateTime GetLastWriteTime(string path);

        /// <summary>
        /// Returns the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last written to.
        /// </summary>
        /// <param name="path">The file or directory for which to obtain modification date and time information.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>A DateTime structure set to the date and time the specified file or directory was last written to. This value is expressed in UTC time.</returns>
        [SecuritySafeCritical]
        DateTime GetLastWriteTimeUtc(string path);

        /// <summary>
        /// Sets the date and time the specified file or directory was last accessed.
        /// </summary>
        /// <param name="path">The file or directory for which to set the access date and time information.</param>
        /// <param name="lastAccessTime">
        /// A DateTime containing the value to set for the access date and time of path. 
        /// This value is expressed in local time.
        /// </param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        void SetLastAccessTime(string path, DateTime lastAccessTime);

        /// <summary>
        /// Sets the date and time, in Coordinated Universal Time (UTC) format, that the specified file or directory was last accessed.
        /// </summary>
        /// <param name="path">The file or directory for which to set the access date and time information.</param>
        /// <param name="lastAccessTimeUtc">
        /// A DateTime containing the value to set for the access date and time of path. 
        /// This value is expressed in UTC time.
        /// </param>
        /// <exception cref="IFileNotFoundException">The specified path was not found.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        /// creationTime specifies a value outside the range of dates or times permitted for this operation.
        /// </exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        [SecuritySafeCritical]
        void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc);

        /// <summary>
        /// Returns the date and time the specified file or directory was last accessed.
        /// </summary>
        /// <param name="path">The file or directory for which to obtain access date and time information.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>
        /// A DateTime structure set to the date and time the specified file or directory was last accessed. 
        /// This value is expressed in local time.
        /// </returns>
        [SecuritySafeCritical]
        DateTime GetLastAccessTime(string path);

        /// <summary>
        /// Returns the date and time, in Coordinated Universal Time (UTC) format, 
        /// that the specified file or directory was last accessed.
        /// </summary>
        /// <param name="path">The file or directory for which to obtain access date and time information.</param>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. For example, 
        /// on Windows-based platforms, paths must be less than 248 characters and file names must be less 
        /// than 260 characters.
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>
        /// A DateTime structure set to the date and time the specified file or directory was last accessed. 
        /// This value is expressed in UTC time.
        /// </returns>
        [SecuritySafeCritical]
        DateTime GetLastAccessTimeUtc(string path);

        /// <summary>
        /// Gets a DirectorySecurity object that encapsulates the access control list (ACL) 
        /// entries for a specified directory.
        /// </summary>
        /// <param name="path">
        /// The path to a directory containing a DirectorySecurity object 
        /// that describes the file's access control list (ACL) information.
        /// </param>
        /// <exception cref="ArgumentNullException">The path parameter is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IIOException">An I/O error occurred while opening the directory.</exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        /// <exception cref="SystemException">The directory could not be found.</exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>
        /// A DirectorySecurity object that encapsulates the access control rules 
        /// for the file described by the path parameter.
        /// </returns>
        DirectorySecurity GetAccessControl(string path);

        /// <summary>
        /// Gets a DirectorySecurity object that encapsulates the access control list (ACL) 
        /// entries for a specified directory.
        /// </summary>
        /// <param name="path">
        /// The path to a directory containing a DirectorySecurity object 
        /// that describes the file's access control list (ACL) information.
        /// </param>
        /// <param name="includeSections">
        /// One of the AccessControlSections values that specifies the type of 
        /// access control list (ACL) information to receive.
        /// </param>
        /// <exception cref="ArgumentNullException">The path parameter is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IIOException">An I/O error occurred while opening the directory.</exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        /// <exception cref="SystemException">The directory could not be found.</exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <returns>
        /// A DirectorySecurity object that encapsulates the access control rules 
        /// for the file described by the path parameter.
        /// </returns>
        DirectorySecurity GetAccessControl(string path, AccessControlSections includeSections);

        /// <summary>
        /// Applies access control list (ACL) entries described by a DirectorySecurity object to the specified directory.
        /// </summary>
        /// <param name="path">A directory to add or remove access control list (ACL) entries from.</param>
        /// <param name="directorySecurity">A DirectorySecurity object that describes an ACL entry to apply to the directory described by the path parameter.</param>
        /// <exception cref="ArgumentNullException">The path parameter is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IDirectoryNotFoundException">
        /// <para>The current process does not have access to the directory specified by path.</para>
        /// <para>or</para>
        /// <para>The current process does not have sufficient privilege to set the ACL entry.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="PlatformNotSupportedException">The current operating system is not Windows NT or later.</exception>
        [SecuritySafeCritical]
        void SetAccessControl(string path, DirectorySecurity directorySecurity);

        /// <summary>
        /// Returns the names of files (including their paths) in the specified directory.
        /// </summary>
        /// <param name="path">The directory from which to retrieve the files.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// <para>or</para>
        /// <para>A network error has occurred.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>A String array of file names in the specified directory.</returns>
        string[] GetFiles(string path);

        /// <summary>
        /// Returns the names of files (including their paths) that match the specified search pattern in the specified directory.
        /// </summary>
        /// <param name="path">The directory from which to retrieve the files.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar or 
        /// AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// <para>or</para>
        /// <para>A network error has occurred.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>
        /// A String array containing the names of files in the specified directory that match the specified search pattern. 
        /// File names include the full path.
        /// </returns>
        string[] GetFiles(string path, string searchPattern);

        /// <summary>
        /// Returns the names of files (including their paths) that match the specified search pattern 
        /// in the specified directory, using a value to determine whether to search subdirectories.
        /// </summary>
        /// <param name="path">The directory from which to retrieve the files.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar or 
        /// AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <param name="searchOption">
        /// One of the SearchOption values that specifies whether the search operation should 
        /// include all subdirectories or only the current directory.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// <para>or</para>
        /// <para>A network error has occurred.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>
        /// A String array containing the names of files in the specified directory that match the specified search pattern. 
        /// File names include the full path.
        /// </returns>
        string[] GetFiles(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Gets the names of subdirectories (including their paths) in the specified directory.
        /// </summary>
        /// <param name="path">The path for which an array of subdirectory names is returned.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An array of the names of subdirectories in path.</returns>
        string[] GetDirectories(string path);

        /// <summary>
        /// Gets an array of directories (including their paths) that match the specified search pattern in the current directory.
        /// </summary>
        /// <param name="path">The path for which an array of subdirectory names is returned.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar or 
        /// AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>A String array of directories that match the search pattern.</returns>
        string[] GetDirectories(string path, string searchPattern);

        /// <summary>
        /// Gets the names of the directories (including their paths) that match the specified search pattern in the current directory, 
        /// and optionally searches subdirectories.
        /// </summary>
        /// <param name="path">The path for which an array of subdirectory names is returned.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar or 
        /// AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <param name="searchOption">One of the SearchOption values that specifies whether the search operation 
        /// should include all subdirectories or only the current directory.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>A String array of directories that match the search pattern.</returns>
        string[] GetDirectories(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Returns the names of all files and subdirectories in the specified directory.
        /// </summary>
        /// <param name="path">The directory for which file and subdirectory names are returned.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An array that contains the names of files and subdirectories in the specified directory.</returns>
        string[] GetFileSystemEntries(string path);

        /// <summary>
        /// Returns an array of file system entries that match the specified search criteria.
        /// </summary>
        /// <param name="path">The directory for which file and subdirectory names are returned.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The searchPattern parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar 
        /// or AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An array of file system entries that match the search criteria.</returns>
        string[] GetFileSystemEntries(string path, string searchPattern);

        /// <summary>
        /// Gets an array of all the file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
        /// </summary>
        /// <param name="path">The directory for which file and subdirectory names are returned.</param>
        /// <param name="searchPattern">
        /// The search string to match against the names of files in path. 
        /// The searchPattern parameter cannot end in two periods ("..") or contain two periods ("..") followed by DirectorySeparatorChar 
        /// or AltDirectorySeparatorChar, nor can it contain any of the characters in InvalidPathChars.
        /// </param>
        /// <param name="searchOption">
        /// The option that specifies whether the search operation should include only the current directory or should include all subdirectories.
        /// The default value is TopDirectoryOnly.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An array of file system entries that match the search criteria.</returns>
        string[] GetFileSystemEntries(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Returns an enumerable collection of directory names in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of directory names in the directory specified by path.</returns>
        IEnumerable<string> EnumerateDirectories(string path);

        /// <summary>
        /// Returns an enumerable collection of directory names that match a search pattern in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of directory names in the directory specified by path and that match searchPattern.</returns>
        IEnumerable<string> EnumerateDirectories(string path, string searchPattern);

        /// <summary>
        /// Returns an enumerable collection of directory names that match a search pattern in a specified path, and optionally searches subdirectories.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <param name="searchOption">
        /// One of the values of the SearchOption enumeration that specifies whether the search operation should 
        /// include only the current directory or should include all subdirectories.
        /// The default value is TopDirectoryOnly.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of directory names in the directory specified by path and that match searchPattern and searchOption.</returns>
        IEnumerable<string> EnumerateDirectories(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Returns an enumerable collection of file names in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file names in the directory specified by path.</returns>
        IEnumerable<string> EnumerateFiles(string path);

        /// <summary>
        /// Returns an enumerable collection of file names that match a search pattern in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file names in the directory specified by path and that match searchPattern.</returns>
        IEnumerable<string> EnumerateFiles(string path, string searchPattern);

        /// <summary>
        /// Returns an enumerable collection of file names that match a search pattern in a specified path, and optionally searches subdirectories.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <param name="searchOption">
        /// One of the values of the SearchOption enumeration that specifies whether the search operation should 
        /// include only the current directory or should include all subdirectories.
        /// The default value is TopDirectoryOnly.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file names in the directory specified by path and that match searchPattern and searchOption.</returns>
        IEnumerable<string> EnumerateFiles(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Returns an enumerable collection of file-system entries in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file-system entries in the directory specified by path.</returns>
        IEnumerable<string> EnumerateFileSystemEntries(string path);

        /// <summary>
        /// Returns an enumerable collection of file-system entries that match a search pattern in a specified path.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file-system entries in the directory specified by path and that match searchPattern.</returns>
        IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern);

        /// <summary>
        /// Returns an enumerable collection of file names and directory names that match a search pattern in a specified path, and optionally searches subdirectories.
        /// </summary>
        /// <param name="path">The directory to search.</param>
        /// <param name="searchPattern">The search string to match against the names of directories in path.</param>
        /// <param name="searchOption">
        /// One of the values of the SearchOption enumeration that specifies whether the search operation should 
        /// include only the current directory or should include all subdirectories.
        /// The default value is TopDirectoryOnly.
        /// </param>
        /// <exception cref="IIOException">
        /// <para>path is a file name.</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters 
        /// and file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified path is invalid (for example, it is on an unmapped drive).</exception>
        /// <returns>An enumerable collection of file-system entries in the directory specified by path and that match searchPattern and searchOption.</returns>
        IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, SearchOption searchOption);

        /// <summary>
        /// Retrieves the names of the logical drives on this computer in the form "drive letter:\".
        /// </summary>
        /// <exception cref="IIOException">
        /// <para>An I/O error occured (for example, a disk error).</para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.</exception>
        /// <returns>The logical drives on this computer.</returns>
        [SecuritySafeCritical]
        string[] GetLogicalDrives();

        /// <summary>
        /// <para>
        /// Returns the volume information, root information, or both for the specified path.
        /// </para>
        /// </summary>
        /// <param name="path">
        /// <para>
        /// The path of a file or directory.
        /// </para>
        /// </param>
        /// <exception cref="UnauthorizedAccessException">
        /// <para>
        /// The caller does not have the required permission.
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <para>
        /// path is a zero-length string, contains only white space, 
        /// or contains one or more invalid characters as defined by InvalidPathChars.
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <para>
        /// path is a null reference (Nothing in Visual Basic). 
        /// </para>
        /// </exception>
        /// <exception cref="IPathTooLongException">
        /// <para>
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters and 
        /// file names must be less than 260 characters. 
        /// </para>
        /// </exception>
        /// <returns>
        /// <para>
        /// A string containing the volume information, root information, or both for the specified path.
        /// </para>
        /// </returns>
        [SecuritySafeCritical]
        string GetDirectoryRoot(string path);

        /// <summary>
        /// <para>
        /// Gets the current working directory of the application.
        /// </para>
        /// </summary>
        /// <exception cref="UnauthorizedAccessException">
        /// <para>
        /// The caller does not have the required permission.
        /// </para>
        /// </exception>
        /// <exception cref="NotSupportedException">
        /// <para>
        /// The operating system is Windows CE, which does not have current directory functionality.
        /// This method is available in the .NET Compact Framework, but is not currently supported.
        /// </para>
        /// </exception>
        /// <returns>
        /// <para>
        /// A string that contains the path of the current working directory, and does not end with a backslash (\).
        /// </para>
        /// </returns>
        [SecuritySafeCritical]
        string GetCurrentDirectory();

        /// <summary>
        /// <para>
        /// Sets the application's current working directory to the specified directory.
        /// </para>
        /// </summary>
        /// <param name="path">
        /// <para>
        /// The path to which the current working directory is set.
        /// </para>
        /// </param>
        /// <exception cref="IIOException">
        /// <para>
        /// An I/O error occurred. 
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <para>
        /// path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <para>
        /// path is a null reference (Nothing in Visual Basic). 
        /// </para>
        /// </exception>
        /// <exception cref="IPathTooLongException">
        /// <para>
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters and 
        /// file names must be less than 260 characters. 
        /// </para>
        /// </exception>
        /// <exception cref="SecurityException">
        /// <para>
        /// The caller does not have the required permission to access unmanaged code. 
        /// </para>
        /// </exception>
        /// <exception cref="IFileNotFoundException">
        /// <para>
        /// The specified path was not found.
        /// </para>
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">
        /// <para>
        /// The specified directory was not found.
        /// </para>
        /// </exception>
        [SecuritySafeCritical]
        void SetCurrentDirectory(string path);

        /// <summary>
        /// Moves a file or a directory and its contents to a new location.
        /// </summary>
        /// <param name="sourceDirName">Name of the source dir.</param>
        /// <param name="destDirName">Name of the dest dir.</param>
        /// <exception cref="IIOException">An I/O error occurred.</exception>
        /// <exception cref="UnauthorizedAccessException">The caller does not have the required permission.</exception>
        /// <exception cref="ArgumentException">
        /// path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.
        /// </exception>
        /// <exception cref="ArgumentNullException">path is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="IPathTooLongException">
        /// The specified path, file name, or both exceed the system-defined maximum length.
        /// For example, on Windows-based platforms, paths must be less than 248 characters and
        /// file names must be less than 260 characters.
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">The specified directory was not found.</exception>
        [SecuritySafeCritical]
        void Move(string sourceDirName, string destDirName);

        /// <summary>
        /// <para>
        /// Deletes an empty directory from a specified path.
        /// </para>
        /// </summary>
        /// <param name="path">
        /// <para>
        /// The name of the empty directory to remove. This directory must be writable or empty.
        /// </para>
        /// </param>
        /// <exception cref="IIOException">
        /// <para>
        /// A file with the same name and location specified by path exists. 
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is the application's current working directory.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory specified by path is not empty.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is read-only or contains a read-only file.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is being used by another process.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// There is an open handle on the directory, and the operating system is Windows XP or earlier. 
        /// This open handle can result from directories. 
        /// For more information, see How to: Enumerate Directories and Files.
        /// </para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">
        /// <para>
        /// The caller does not have the required permission.
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <para>
        /// path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <para>
        /// path is a null reference (Nothing in Visual Basic). 
        /// </para>
        /// </exception>
        /// <exception cref="IPathTooLongException">
        /// <para>
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters and 
        /// file names must be less than 260 characters. 
        /// </para>
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">
        /// <para>
        /// The specified directory was not found.
        /// </para>
        /// </exception>
        [SecuritySafeCritical]
        void Delete(string path);

        /// <summary>
        /// <para>
        /// Deletes the specified directory and, if indicated, any subdirectories and files in the directory. 
        /// </para>
        /// </summary>
        /// <param name="path">The name of the directory to remove.</param>
        /// <param name="recursive">true to remove directories, subdirectories, and files in path; otherwise, false. </param>
        /// <exception cref="IIOException">
        /// <para>
        /// A file with the same name and location specified by path exists. 
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is the application's current working directory.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory specified by path is not empty.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is read-only or contains a read-only file.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// The directory is being used by another process.
        /// </para>
        /// <para>- or -</para>
        /// <para>
        /// There is an open handle on the directory, and the operating system is Windows XP or earlier. 
        /// This open handle can result from directories. 
        /// For more information, see How to: Enumerate Directories and Files.
        /// </para>
        /// </exception>
        /// <exception cref="UnauthorizedAccessException">
        /// <para>
        /// The caller does not have the required permission.
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentException">
        /// <para>
        /// path is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars. 
        /// </para>
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <para>
        /// path is a null reference (Nothing in Visual Basic). 
        /// </para>
        /// </exception>
        /// <exception cref="IPathTooLongException">
        /// <para>
        /// The specified path, file name, or both exceed the system-defined maximum length. 
        /// For example, on Windows-based platforms, paths must be less than 248 characters and 
        /// file names must be less than 260 characters. 
        /// </para>
        /// </exception>
        /// <exception cref="IDirectoryNotFoundException">
        /// <para>
        /// The specified directory was not found.
        /// </para>
        /// </exception>
        [SecuritySafeCritical]
        void Delete(string path, bool recursive);
    }
}